    <link href="/static/public/webupload/webuploader.css" rel="stylesheet">
    <link rel="shortcut icon" href="/static/manage/img/favicon.ico">
    <link href="/static/school/css/layout.css" type="text/css" rel="stylesheet" />
    
    <script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
    <!--私有部分-->
    <link href="/static/school/css/frame.style.css" type="text/css" rel="stylesheet" />

    <link href="/static/school/css/default.style.css" type="text/css" rel="stylesheet" />
    <link href="/static/public/layer/src/css/layui.css" rel="stylesheet">
    
    <script src="/static/public/layer/src/layui.js"></script>
    <script src="/static/school/js/default.common.js" type="text/javascript"></script>
<div style="padding: 0 20px">
    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
                <{assign var="pid" value=$conditions['pid']|default:"all"}>
                <div class="layui-form-item">

                    <div class="layui-input-inline">
                        <select name="category[cate_id]" class="abc" lay-verify="required" id="cate_id" placeholder="请选择" lay-filter="cate_id">
                            <option value="0">课程分类</option>
                            <{foreach from=$cate item=item}>

                                <option value="<{$item.id}>" <{if $data['cate_id']|default:"" eq $item.id}>selected="selected"<{/if}>><{$item.name}></option>
                            <{/foreach}>
                        </select>
                    </div>
                    <div class="layui-inline">
                        <select name="category[subject_id]" lay-verify="required" id="subject" placeholder="请选择" lay-filter="subject">
                            <option value="">请选择科目</option>
                             <{foreach from=$subject item=item}>
                                <option value="<{$item.id}>" <{if $data['subject_id']|default:"" eq $item.id}>selected="selected"<{/if}>><{$item.name}></option>
                            <{/foreach}>
                        </select>
                    </div>

                    <div class="layui-inline">
                        <input type="text" name="category[search]" placeholder="搜索内容" value="<{if $data['search']}><{$data['search']}><{/if}>" class="layui-input">
                    </div>

                    <div class="layui-inline">
                        <button type="submit" class="layui-btn">搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </fieldset>
            
    <form class="layui-form layui-form-pane1" method="post" action="/video/update_sorts" delete_action="/video/delete">
        <table class="layui-table" lay-even lay-skin="row">
            <thead>
                <tr>
                    <th></th>
                    <th>文件名称</th>
                    <th>时长</th>
                    <th>上架时间</th>
                </tr>
            </thead>   
            <tbody>
            <{foreach from=$video item=item}>
            <tr>
                <td class="not_lb tal"><!-- <input type="checkbox"> -->
                    <input type="radio" class="vids" name="ids" value="<{$item['id']}>" title="<{$item['title']}>">
                </td>
                <td class="not_lb tal">
                    <div class="">
                       <div class="t_img">
                            <img src="<{$item['image_url']}>" height="90" width="150"/>
                       </div>
                        <div class="t_info">
                            <a class="fs16" href="javascript:;"><{$item['title']}></a>
                        </div>
                    </div>
                </td>
                <td class="not_lb tal"><{$item['duration']}></td>
                <td class="not_lb tal"><{$item['add_time']|date_format:'%Y-%m-%d  %H:%M:%S'}></td>
            </tr>
            <{/foreach}>
            <{if $video|count eq 0}>
                <tr>
                    <td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
                        赞无数据！
                    </td>
                </tr>
            <{/if}>
            <tr>
                <td class="center" colspan="12">
                    <a href="javascript:;" id="tijiao" class="layui-btn layui-btn-primary layui-btn-small" style="margin-top:4px;">提交</a>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
    <div class="layui-box layui-laypage layui-laypage-default">
        <{$pagination}>
        <{if $page_total > 1}>
        <input type="text" class="inputwh" id="yema" placeholder="页码"> <a id="jump" href="javascript:;" h="/course/select_video/<{$data.cate_id}>/<{$data.subject_id}>/<{$data.search}>/">GO</a>
        <{/if}>
    </div>
</div>
<script>
$(function(){
    $.fn.Dashentab(".cetContent .tit","span",".tabMainCont",".tabItem","curr","click",0);
    $("#jump").click(function(){
        var limit = $("#yema").val();
        if(isNaN(limit)){
            return false;
        }
        if(limit <= 0){
            return false;
        }
        if(limit > "<{$page_total}>"){
            alert("最多<{$page_total}>页");
            return false;
        }
        window.location.href=$(this).attr("h") + limit;
    })
});
layui.use(['form', 'jquery', 'layer'], function(){
    var form = layui.form(),$ = layui.jquery, layer = layui.layer;
    $("#tijiao").click(function(){
        // var index_of = "<{$index|default:0}>";
        var radio_val = $("input[name='ids']:checked").val();
        var radio_title = $("input[name='ids']:checked").attr('title');
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index);
        var _this = $(this);
        var input = "<p id='vid_"+radio_val+"''>"+radio_title+"</p><input type='hidden' class='selected' name='vid' value='"+radio_val+"'>";
       
        $(window.parent.document).find(".add_video").eq(0).next().empty()
        $(window.parent.document).find(".add_video").eq(0).next().append(input)
    })

    form.on('select(cate_id)', function(data){
        var ii = layer.load();
        var id = data.value;
        $("#course_id").html('<option value="">请选择科目</option>');
        form.render('select');
        $.ajax({
            type: "POST",
            url: "/course/get_cate_subject",
            data: {id:id},
            dataType: "json",
            success: function (data) {
                var ddl = $("#subject");
                var html ='<option value="">请选择科目</option>';
                $(data).each(function (key) {
                    html += "<option value='"+data[key].id+"'>"+data[key].name+"</option>";
                });
                $("#subject").html(html);
                form.render('select');
                layer.close(ii);
            }
        });
    }); 
});
</script>
            </div>
</div>
    
    <script type="text/javascript" src="/static/public/webupload/webuploader.js"></script>
    <script type="text/javascript" src="/static/public/webupload/upload.js"></script>
    <script src="/static/manage/js/common.js"></script>
    <script type="text/javascript">
        var fileNumLimit = 1;
    </script>
    </body>
</html>